#ifndef __TMS470_ERROR_H__
#define __TMS470_ERROR_H__

#define SUCCESS                         (0)

#define ERROR_GOTO_FINALRPM             (2)
#define ERROR_USER_CANCEL               (1)
#define ERROR_UNKNOWN                   (-1)
#define ERROR_PARAMETER                 (-2)
#define ERROR_STILL_RUN                 (-3)
#define ERROR_OVER_RANGE                (-4)
#define ERROR_AUTOBALANCING             (-5)

#define ERROR_MAINBOARD_CAN             (-10)
#define ERROR_FRAM_CLEAR                (-11)
#define ERROR_FRAM_CANNOT_WRITE         (-12)
#define ERROR_ROTOR_TYPE                (-13)
#define ERROR_ROTOR_POWER               (-14)
#define ERROR_ROTOR_NOT_RESPONDING      (-15)
#define ERROR_ROTOR_RET_ORG             (-16)
#define ERROR_ROTOR_JAM                 (-17)
#define ERROR_ROTOR_TIMEOUT             (-18)
#define ERROR_DSP_POWER                 (-20)
#define ERROR_DSP_NOT_RESPONDING        (-21)
#define ERROR_DSP_TIMEOUT               (-22)
#define ERROR_MOTOR_COMM                (-23)
#define ERROR_MOTOR_IMBALANCE           (-25)
#define ERROR_MOTOR_OVER_VOLTAGE        (-26)
#define ERROR_MOTOR_OVER_CURRENT        (-27)
#define ERROR_MOTOR_OVER_HEAT_CTRLER    (-28)
#define ERROR_MOTOR_OVER_HEAT_MOTOR     (-29)
#define ERROR_MOTOR_HALL_SENSOR         (-30)
#define ERROR_MOTOR_LOW_VOLTAGE         (-31)
#define ERROR_MOTOR_OVER_ACCEL          (-32)
#define ERROR_MOTOR_UNDER_ACCEL         (-33)
#define ERROR_MOTOR_CANNOT_KEEP         (-34)
#define ERROR_MOTOR_FREERUN             (-35)
#define ERROR_MOTOR_CANNOT_DECEL        (-36)
#define ERROR_MOTOR_CANNOT_STOP         (-37)
#define ERROR_DOOR_OPEN                 (-38)
#define ERROR_NO_RPM                    (-39)
#define ERROR_VIB_TOO_MUCH              (-40)
#define ERROR_VIB_UNSTABLE              (-41)
#define ERROR_TTE_MOTOR_EXPIRED         (-42)
#define ERROR_TTE_ROTOR_EXPIRED         (-43)
#define ERROR_TTE_BUCKET_EXPIRED        (-44)
#define ERROR_TTE_COOLER_EXPIRED        (-45)
#define ERROR_TEMP_CONTROL              (-46)
#define ERROR_FRAM_READ                 (-47)
#define ERROR_FRAM_WRITE                (-48)
#define ERROR_FRAM_CRC                  (-49)
#define ERROR_ROTOR_PAIR                (-50)
#define ERROR_FRAM_COMPARE              (-51)
#define ERROR_PROGRAM_19_LOCK           (-52)
#define ERROR_DSP_NOT_EXIST_VIB_SENSOR  (-53)
#define ERROR_NOT_PRE_COOLING           (-54)

#define ERROR_I2C_COMM_1                (-100)
#define ERROR_I2C_COMM_2                (-101)
#define ERROR_I2C_COMM_3                (-102)
#define ERROR_I2C_COMM_4                (-103)
#define ERROR_I2C_COMM_5                (-104)
#define ERROR_IRQ_REG_OVERFLOW          (-105)
#define ERROR_DMA_ERROR_1               (-106)
#define ERROR_DMA_ERROR_2               (-107)
#define ERROR_CAN_CANNOT_GETACCESS      (-108)
#define ERROR_CAN_CANNOT_START          (-109)
#define ERROR_CAN_CANNOT_CLEAR_TXFLAG   (-110)
#define ERROR_CAN_NOT_END_TRANS         (-111)
#define ERROR_CAN_RECV_TIMEOUT          (-112)
#define ERROR_SPI_TIMEOUT               (-113)

#endif

